package com.jic.order.enums;

public enum DeliverStatusEnum {

    WAIT_SHIP(1, "待发货"),
    ALREADY_SHIP(2, "已发货");

    private Integer code;

    private String message;

    DeliverStatusEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public DeliverStatusEnum getByCode(Integer code){
        DeliverStatusEnum[] values = DeliverStatusEnum.values();
        for(DeliverStatusEnum value : values){
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
